/*
 * @Author: gyc
 * @Date: 2020-07-01 16:08:43
 * @LastEditTime: 2020-07-02 09:43:00
 * @Description: Nuxt测试版
 */
const Service = require('egg').Service;
class MusicService extends Service {
    async findOne(id) {
        const data = await this.app.mysql.get("yui_music", {
            id: id
        })
        return data;
    }
    async findALL() {
        const data = await this.app.mysql.select("yui_music", {
            where: {
                status: 1
            },
            limit: 7,
            columns: ['id', 'name', 'img'],
            orders: [
                ['id', 'desc']
            ]
        })
        return data;
    }
}

module.exports = MusicService;